#ifndef PROJECT_H
#define PROJECT_H

#include "corecommon.h"
namespace TA {


class Project : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QString uuid         READ getUuid         WRITE setUuid)
    Q_PROPERTY(QDate   createDate   READ getCreateDate   WRITE setCreateDate)
    Q_PROPERTY(QString projectTitle READ getProjectTitle WRITE setProjectTitle)
    Q_PROPERTY(bool    deleted      READ getDeleted      WRITE setDeleted)

    Q_PROPERTY(DocumentRawPtrArray* documents  READ getDocuments WRITE setDocuments)
    Q_PROPERTY(WordRawPtrArray*     words      READ getWords     WRITE setWords)

public:
    explicit Project(QObject *parent = 0);

    Project(QObject* parent,const QString& uuid);

    QString getUuid() const;
    void setUuid(const QString &value);

    QDate getCreateDate() const;
    void setCreateDate(const QDate &value);

    QString getProjectTitle() const;
    void setProjectTitle(const QString &value);

    bool getDeleted() const;
    void setDeleted(bool value);

    DocumentRawPtrArray* getDocuments() const;
    void setDocuments(const DocumentRawPtrArray* value);

    WordRawPtrArray* getWords() const;
    void setWords(const WordRawPtrArray* value);

    bool hasDocument(Document* doc);

    Document* findDocument(const QString& title);
    Word* findWord(const QString& word);

    WordGroupRawPtrArray* getGroups() const;

    void setGroups(const WordGroupRawPtrArray &groups);

public:
    bool operator==(const Project& rhs);
    bool operator!=(const Project& rhs);

private:
    QString uuid;
    QDate createDate;
    QString projectTitle;
    bool deleted;
    DocumentRawPtrArray documents;
    WordRawPtrArray words;
    WordGroupRawPtrArray groups;


signals:

public slots:
};


}

#endif // PROJECT_H
